﻿@model CREAPA.Dominio.Funcionario
@{
    ViewBag.Title = "ResetarSenha";
    Layout = "~/Views/Shared/_LayoutLogin.cshtml";
}
<script src="~/Scripts/js/JavaScriptUtil.js"></script>
<script src="~/Scripts/js/Parsers.js"></script>
<script src="~/Scripts/js/original/InputMask.js"></script>

<link rel="stylesheet" href="@Url.Content("~/Content/style.css")" />
<script language="javascript">
    function setup() {
        var cpfMask = new InputMask("###.###.###-##", "Pessoa_CPF");
        var loginMask = new InputMask(fieldBuilder.lowerLetters(), "Login");
        var emailMask = new InputMask([fieldBuilder.lowerLetters(), fieldBuilder.literal(String.fromCharCode(64) + "creapa.com.br")], "Pessoa_Email");
    }
</script>
<style>
    fieldset {
     background-color:white;
    }

    fieldset.grupo {
        border: 0;

    }
    .grupo:after {
        content: ".";
        display: block;
        height: 0;
        clear: both;
        visibility: hidden;
    }
    .campo {
        margin-bottom: 1em;
    }
    .campo label {
        margin-bottom: 0.2em;
        color: #000;
        display: block;
        margin-left: 5px;
        }

    fieldset.grupo .campo {
        float: left;
        margin-right: 2em;
    }

    .campo input[type="text"],
    .campo input[type="email"],
    /*.campo input[type="url"],*/
    .campo input[type="tel"],
    .campo select,
    .campo textarea {
    margin-left: 5px;
    border: solid 1px #E5E5E5;
	background: #FFFFFF;
	margin: 5px 30px 0px 0px;
	padding: 9px;
	display:block;
	font-size:16px;
	width:300px;
	background: 
		-webkit-gradient(
			linear,
			left top,
			left 25,
			from(#FFFFFF),
			color-stop(4%, #EEEEEE),
			to(#FFFFFF)
		);
	background: 
		-moz-linear-gradient(
			top,
			#FFFFFF,
			#EEEEEE 1px,
			#FFFFFF 25px
			);
	-moz-box-shadow: 0px 0px 8px #f0f0f0;
	-webkit-box-shadow: 0px 0px 8px #f0f0f0;
	box-shadow: 0px 0px 8px #f0f0f0;
    }
</style>

@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
<body onload="setup()">
<br><br><br><br><br>
    <div class="wrapper">
        <div class="content">
			<div id="form_wrapper" class="form_wrapper">
                   <form class="login active">
    <fieldset>
<h3>
        <center>Resetar Senha</center>
    </h3>
<fieldset class="grupo">
<center>@Html.ValidationSummary(true)</center>
<div class="campo">
<div class="editor-label">
            @Html.LabelFor(model => model.Login)
</div>
        <div class="editor-field">
        <div class="login-msg">
            @Html.EditorFor(model => model.Login)
            @Html.ValidationMessageFor(model => model.Login)
    </div>
<div class="editor-label">
         @Html.LabelFor(model => model.Pessoa.CPF)
</div>
        <div class="editor-field">
        <div class="login-msg">
            @Html.EditorFor(model => model.Pessoa.CPF)
           @Html.ValidationMessageFor(model => model.Pessoa.CPF)
    </div>

<div class="editor-label">
         @Html.LabelFor(model => model.Pessoa.Email)
</div>
        <div class="editor-field">
        <div class="login-msg">
            @Html.EditorFor(model => model.Pessoa.Email)
            @Html.ValidationMessageFor(model => model.Pessoa.Email)
    </div>
    <input type="submit" value="Enviar" class="button" style="margin:15px 0px 10px 10px;"/>
     @Html.ActionLink("Voltar", "Login","Funcionario", new {@class="buttonV"})  
</div></div></div>
 </fieldset>
    </form>
    </div>   
       </div>
        </div>
</body>
}
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
<script>
    jQuery(document).ready(function () {
        // verifica se existe algum elemento com a class
        if ($(".button").length) {
            // adiciona evento desabilitando o botão
            $(".button").on('click', function () {
                $(this).attr({
                    disabled: true
                });
                // descobrindo o form pai e enviando
                this.value = 'Enviando...';
                $(this).parents('form:first').submit();
            });
        }
    });
</script>